package br.com.orion.sga.model.entities;

// Generated Jul 19, 2014 6:45:05 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * PeriodoLiberacao generated by hbm2java
 */
@Entity
@Table(name = "periodo_liberacao", catalog = "sga")
public class PeriodoLiberacao implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long id;	
	private Aluno aluno;
	private Date periodo;
	private char status;

	public PeriodoLiberacao() {
	}

	public PeriodoLiberacao(long id, Aluno aluno, char status) {
		this.id = id;
		this.aluno = aluno;
		this.status = status;
	}

	public PeriodoLiberacao(long id, Aluno aluno, Date periodo, char status) {
		this.id = id;
		this.aluno = aluno;
		this.periodo = periodo;
		this.status = status;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "id_aluno", nullable = false)
	public Aluno getAluno() {
		return this.aluno;
	}

	public void setAluno(Aluno aluno) {
		this.aluno = aluno;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "periodo", length = 0)
	public Date getPeriodo() {
		return this.periodo;
	}

	public void setPeriodo(Date periodo) {
		this.periodo = periodo;
	}

	@Column(name = "status", nullable = false, length = 1)
	public char getStatus() {
		return this.status;
	}

	public void setStatus(char status) {
		this.status = status;
	}

}
